3.541 \(\int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx\)

Optimal. Leaf size=70 \[ -\frac{2 \left (a^2+b^2\right ) \cos (c+d x) (b-a \tan (c+d x))}{3 d}-\frac{\cos ^3(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{3 d} \]

[Out]

(-2*(a^2 + b^2)*Cos[c + d*x]*(b - a*Tan[c + d*x]))/(3*d) - (Cos[c + d*x]^3*(b - a*Tan[c + d*x])*(a + b*Tan[c +
 d*x])^2)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0687944, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3512, 723, 637} \[ -\frac{2 \left (a^2+b^2\right ) \cos (c+d x) (b-a \tan (c+d x))}{3 d}-\frac{\cos ^3(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Tan[c + d*x])^3,x]

[Out]

(-2*(a^2 + b^2)*Cos[c + d*x]*(b - a*Tan[c + d*x]))/(3*d) - (Cos[c + d*x]^3*(b - a*Tan[c + d*x])*(a + b*Tan[c +
 d*x])^2)/(3*d)

Rule 3512

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(d^(2
*IntPart[m/2])*(d*Sec[e + f*x])^(2*FracPart[m/2]))/(b*f*(Sec[e + f*x]^2)^FracPart[m/2]), Subst[Int[(a + x)^n*(
1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && NeQ[a^2 + b^2, 0] &&
 !IntegerQ[m/2]

Rule 723

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^(m - 1)*(a*e - c*d*x)*(a
 + c*x^2)^(p + 1))/(2*a*c*(p + 1)), x] + Dist[((2*p + 3)*(c*d^2 + a*e^2))/(2*a*c*(p + 1)), Int[(d + e*x)^(m -
2)*(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && EqQ[m + 2*p + 2, 0] && Lt
Q[p, -1]

Rule 637

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2)^(3/2), x_Symbol] :> Simp[(-(a*e) + c*d*x)/(a*c*Sqrt[a + c*x^2]),
 x] /; FreeQ[{a, c, d, e}, x]

Rubi steps

\begin{align*} \int \cos ^3(c+d x) (a+b \tan (c+d x))^3 \, dx &=\frac{\left (\cos (c+d x) \sqrt{\sec ^2(c+d x)}\right ) \operatorname{Subst}\left (\int \frac{(a+x)^3}{\left (1+\frac{x^2}{b^2}\right )^{5/2}} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=-\frac{\cos ^3(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{3 d}+\frac{\left (2 \left (a^2+b^2\right ) \cos (c+d x) \sqrt{\sec ^2(c+d x)}\right ) \operatorname{Subst}\left (\int \frac{a+x}{\left (1+\frac{x^2}{b^2}\right )^{3/2}} \, dx,x,b \tan (c+d x)\right )}{3 b d}\\ &=-\frac{2 \left (a^2+b^2\right ) \cos (c+d x) (b-a \tan (c+d x))}{3 d}-\frac{\cos ^3(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.356454, size = 81, normalized size = 1.16 \[ \frac{-9 b \left (a^2+b^2\right ) \cos (c+d x)+\left (b^3-3 a^2 b\right ) \cos (3 (c+d x))+2 a \sin (c+d x) \left (\left (a^2-3 b^2\right ) \cos (2 (c+d x))+5 a^2+3 b^2\right )}{12 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Tan[c + d*x])^3,x]

[Out]

(-9*b*(a^2 + b^2)*Cos[c + d*x] + (-3*a^2*b + b^3)*Cos[3*(c + d*x)] + 2*a*(5*a^2 + 3*b^2 + (a^2 - 3*b^2)*Cos[2*
(c + d*x)])*Sin[c + d*x])/(12*d)

________________________________________________________________________________________

Maple [A]  time = 0.055, size = 75, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ( -{\frac{{b}^{3} \left ( 2+ \left ( \sin \left ( dx+c \right ) \right ) ^{2} \right ) \cos \left ( dx+c \right ) }{3}}+a{b}^{2} \left ( \sin \left ( dx+c \right ) \right ) ^{3}-b{a}^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{{a}^{3} \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*tan(d*x+c))^3,x)

[Out]

1/d*(-1/3*b^3*(2+sin(d*x+c)^2)*cos(d*x+c)+a*b^2*sin(d*x+c)^3-b*a^2*cos(d*x+c)^3+1/3*a^3*(2+cos(d*x+c)^2)*sin(d
*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.1216, size = 104, normalized size = 1.49 \begin{align*} -\frac{3 \, a^{2} b \cos \left (d x + c\right )^{3} - 3 \, a b^{2} \sin \left (d x + c\right )^{3} +{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{3} -{\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} b^{3}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/3*(3*a^2*b*cos(d*x + c)^3 - 3*a*b^2*sin(d*x + c)^3 + (sin(d*x + c)^3 - 3*sin(d*x + c))*a^3 - (cos(d*x + c)^
3 - 3*cos(d*x + c))*b^3)/d

________________________________________________________________________________________

Fricas [A]  time = 1.75308, size = 173, normalized size = 2.47 \begin{align*} -\frac{3 \, b^{3} \cos \left (d x + c\right ) +{\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{3} -{\left (2 \, a^{3} + 3 \, a b^{2} +{\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/3*(3*b^3*cos(d*x + c) + (3*a^2*b - b^3)*cos(d*x + c)^3 - (2*a^3 + 3*a*b^2 + (a^3 - 3*a*b^2)*cos(d*x + c)^2)
*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right )^{3} \cos ^{3}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*tan(d*x+c))**3,x)

[Out]

Integral((a + b*tan(c + d*x))**3*cos(c + d*x)**3, x)

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c))^3,x, algorithm="giac")

[Out]

Timed out